#include "RingDeny.h"

#include <stdlib.h>
#include <sstream>
#include <stdio.h>

#include <Poco/DOM/Document.h>
#include <Poco/DOM/NodeIterator.h>
#include "misc/Interface.h"
#include "misc/Debug.h"
#include "nameserver/NameServer.h"
/*********************************************************/
void RingDeny::execute()
{
	// Name server doesn't execute ringdeny messages, do nothing
}
/*********************************************************/
std::string RingDeny::serialize() const
{
	NameServer& ns = NameServer::Instance();
	std::ostringstream		ostr;
	id = ns.getID();

	ostr << "<GS id='" << id << "'>";
	ostr << "<RingDeny>" << name << "</RingDeny>";
	ostr << "</GS>";

	return( ostr.str() );
}
/*********************************************************/
void RingDeny::deserialize(Poco::XML::NodeIterator& it)
{
	// Name server is the only one sending ring deny messages so we don't do anything here
}
/*********************************************************/
void RingDeny::setName(const std::string& n)
{
	name = n;
}
/*********************************************************/
std::string RingDeny::getName() const
{
	return name;
}
/*********************************************************/
